As mentioned in a Patent Document 1, for restraining knocking in an internal combustion engine, a so-called trace knock control is performed to retard the ignition timing when a knocking at a predetermined level is detected. In the case of the internal combustion engine equipped with a valve timing varying mechanism capable of varying a valve timing of an engine valve (intake vale and exhaust valve) of the engine, a control system is arranged to sense an actual valve timing with a sensor such as a cam angle sensor, and to set the ignition timing (variation and speed of the ignition timing) in accordance with the sensed valve timing.